1. Field of the Invention
The present invention relates to a serial peripheral interface (SPI) circuit and a display using the same.
2. Description of Related Art
In recent years, as a liquid crystal display has been more and more widely applied, it has been used as a display equipment for numerous consumer electronic products such as cell phones and computer screens. Generally, a liquid crystal display includes a liquid crystal display (LCD) panel, an LCD panel driving circuit and a storage device for storing initialization data of the LCD panel. The data transmission between the driving circuit and the storage device is mainly achieved through a serial peripheral interface (briefly referred to as SPI below), which allows the serial data exchange between the driving circuit (master device) and the storage device (slave device).
Generally, the above SPI is mainly classified as a three-port SPI and a four-port SPI.
FIG. 1 is a structural schematic diagram of a conventional four-port SPI circuit for a liquid crystal display. The four-port SPI circuit 100 includes an LCD panel driving circuit 110 and a serial storage device 120 (for example, serial flash memory). The LCD panel driving circuit 110 includes a main control unit (MCU) 130. The MCU 130 and the serial storage device 120 respectively include chip enable pins 131 and 121 for transmitting chip enable signals CE (Chip Enable), serial clock pins 132 and 122 for transmitting serial clock signals SCK, serial data input pins 133 and 123 for inputting data signals SI (Serial Data In, SI shown in the figure), and serial data output pins 134 and 124 for outputting data signals SO (Serial Data Out, SO shown in the figure). However, the MCU 130 is the master device of the four-port SPI circuit 100, and the serial storage device 120 is the slave device of the four-port SPI circuit 100.
FIG. 2 is a timing control diagram of the four-port SPI circuit 100 shown in FIG. 1 in a master read cycle. Referring to FIG. 2, before the data transmission starts, the chip enable pin 131 of the MCU 130 outputs a chip enable signal CE at a low potential (the inverted chip enable signal CE# as shown in the figure is at a high potential) to the chip enable pin 121 of the serial storage device 120, so that the serial data output pin 124 of the serial storage device 120 is set in a high impedance state. When the data transmission starts, the chip enable pin 131 of the MCU 130 outputs a chip enable signal CE at a high potential (the inverted chip enable signal CE# as shown in the figure is at a low potential) to the chip enable pin 121 of the serial storage device 120, for informing the serial storage device 120 that the communication starts.
Then, the MCU 130 outputs eight clocks 0-7 to the serial clock pin 122 of the serial storage device 120 via the serial clock pin 132, and transfers a read instruction to the serial data input pin 123 of the serial storage device 120 in the eight clocks via the serial data input pin 133, so as to inform the serial storage device 120 that this is a data read cycle. At the point of the eighth clock falling edge, the serial storage device 120 sets the serial data output pin 124 thereof in a normal output status, and then outputs data to the MCU 130 via the serial data output pin 124 according to the received clocks. When the data transmission is finished, the chip enable pin 131 of the MCU 130 re-outputs a chip enable signal CE at a low potential (the inverted chip enable signal CE# as shown in the figure is at a high potential) to the chip enable pin 121 of the serial storage device 120, so that the serial data output pin 124 of the serial storage device 120 is set in a high impedance state.
FIG. 3 is a timing control diagram of the four-port SPI circuit 100 shown in FIG. 1 in a master write cycle. Referring to FIG. 3, when the data transmission starts, the chip enable pin 131 of the MCU 130 outputs a chip enable signal CE at a high potential (the inverted chip enable signal CE# as shown in the figure is at a low potential) to the chip enable pin 121 of the serial storage device 120, for informing the serial storage device 120 to start transmission. Then, the MCU 130 outputs eight clocks 0-7 to the serial clock pin 122 of the serial storage device 120 via the serial clock pin 132 thereof, and then transfers a write instruction to the serial data input pin 123 of the serial storage device 120 in the eight clocks via the serial data input pin 133, so as to inform the serial storage device 120 that the communication this time is a data write cycle.
At the point of the eighth clock falling edge, the MCU 130 outputs data to the serial storage device 120 according to the clock SCK via the serial data output pin 134 thereof. When the data transmission is finished, the chip enable pin 131 of the MCU 130 re-outputs a chip enable signal CE at a low potential (the inverted chip enable signal CE# as shown in the figure is at a high potential) to the chip enable pin 121 of the serial storage device 120. In the data write cycle, the serial data output pin 124 of the serial storage device 120 always maintains a high impedance state.
FIG. 4 is a structural schematic diagram of a conventional three-port SPI circuit for a liquid crystal display. The three-port SPI circuit 200 includes an LCD panel driving circuit 210 and a serial storage device 220. The LCD panel driving circuit 210 includes a main control unit (MCU) 230. The MCU 230 and serial storage device 220 respectively include chip enable pins 231 and 221 for transmitting chip enable signals, serial clock pins 232 and 222 for transmitting serial clock signals SCK, and data input/output pins 233 and 223 for inputting/outputting data signals SI/SO (Serial data in/out) respectively. The MCU 230 is a master device of the three-port SPI circuit 200, and the serial storage device 220 is a slave device of the three-port SPI circuit 200.
FIG. 5 is a timing control diagram of the three-port SPI circuit 200 shown in FIG. 4 in a master read cycle. Referring to FIG. 5, when the data transmission starts, the chip enable pin 231 of the MCU 230 outputs a chip enable signal CE at a high potential (the inverted chip enable signal CE# as shown in the figure is at a low potential) to the chip enable pin 221 of the serial storage device 220, for informing the serial storage device 220 to start transmission. Then, the MCU 230 outputs eight clocks 0-7 to the serial clock pin 222 of the serial storage device 220 via the serial clock pin 232, and then transfers a read instruction to the data input/output pin 223 of the serial storage device 220 in the eight clocks via the data input/output pin 233, for informing the serial storage device 220 that the communication this time is a data read cycle. At the point of the eighth clock falling edge, the serial storage device 220 outputs data to the MCU 230 according to the received clocks via the data input/output pin 223. When the data transmission is finished, the chip enable pin 231 of the MCU 230 re-outputs a chip enable signal CE at a low potential (the inverted chip enable signal CE# as shown in the figure is at a high potential) to the chip enable pin 221 of the serial storage device 220, and then the data input/output pin 223 of the serial storage device 220 returns to maintain a high impedance state.
FIG. 6 is a timing control diagram of the three-port SPI circuit 200 shown in FIG. 4 in a master write cycle. Referring to FIG. 6, when the data transmission starts, the chip enable pin 231 of the MCU 230 outputs a chip enable signal CE at a high potential (the inverted chip enable signal CE# as shown in the figure is at a low potential) to the chip enable pin 221 of the serial storage device 220, for informing the serial storage device 220 to start transmission. Then, the MCU 230 outputs eight clocks 0-7 to the serial clock pin 222 of the serial storage device 220 via the serial clock pin 232, and then transfers a write instruction to the data input/output pin 223 of the serial storage device 220 via the data input/output pin 233, so as to inform the serial storage device 220 that the communication this time is a data write cycle. At the point of the eighth clock falling edge, the MCU 230 outputs data to the serial storage device 220 according to the clocks via the data input/output pin 233. When the data transmission is finished, the chip enable pin 231 of the MCU 230 re-outputs a chip enable signal CE at a low potential (the inverted chip enable signal CE# as shown in the figure is at a high potential) to the chip enable pin 221 of the serial storage device 220. Then, the data input/output pin 233 returns to maintain a high impedance state.
As the liquid crystal displays in the prior art have the above two incompatible SPI circuits 100 and 200, the storage devices having the three-port SPI cannot be used interchangeably with those having the four-port SPI, which causes difficulties for reducing the design and manufacture costs of the liquid crystal display.